home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7070 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.dacom.co.kr!bora!hanchrok
  2. From: hanchrok@bora.dacom.co.kr (Han Chi Rok)
  3. Newsgroups: comp.lang.c
  4. Subject: Q: atof with far* to string
  5. Date: 18 Feb 1996 06:06:43 GMT
  6. Organization: DACOM Internet
  7. Message-ID: <4g6flj$rme@nis.dacom.co.kr>
  8. NNTP-Posting-Host: bora.dacom.co.kr
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Help me.
  12. I made a function that can be used in Windows programming.
  13.  
  14. void func(LPSTR lpszData)
  15. {
  16.     ...
  17.     double dValue=atof(lpszData);
  18.     //            ----
  19. }
  20.  
  21. When compiled with COMPACT or LARGE model, it works good.
  22. But when I try to compile it with SMALL or MEDIUM model, 
  23. the compiler sends me error message that 
  24. 'unsigned char far*' cannot be converted into 'unsigned char*'.
  25.  
  26. I think 'atof' needs argument 'char far*' with COMPACT or LARGE, 
  27. but 'char*' with SMALL or MEDIUM model.
  28. But I have to call it with far pointer to string even under 
  29. SMALL or MEDIUM memory model.
  30. atof((char near*)lpszData) gives only a wrong reference.
  31.      ------------
  32. Help me, please.
  33. Thanks in advance.
  34.  
  35. Chirok from Seoul
  36.  
  37.